#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>

int main() {
    int hour, min, howlong;
    scanf("%d:%d %d", &hour, &min, &howlong);
    hour = (hour + (min + howlong) / 60) % 24;
    min = (min + howlong) % 60;
    printf("%#02d:%#02d", hour, min);


    return 0;
}